package npap.cater.unr.edu.server.locator;

import com.google.web.bindery.requestfactory.shared.Locator;
import npap.cater.unr.edu.client.domain.Contact;
import org.springframework.roo.addon.gwt.RooGwtLocator;
import org.springframework.stereotype.Component;

@RooGwtLocator("npap.cater.unr.edu.client.domain.Contact")
@Component
public class ContactLocator extends Locator<Contact, Long> {

    public Contact create(Class<? extends npap.cater.unr.edu.client.domain.Contact> clazz) {
        return new Contact();
    }

    public Contact find(Class<? extends npap.cater.unr.edu.client.domain.Contact> clazz, Long id) {
        return Contact.findContact(id);
    }

    public Class<npap.cater.unr.edu.client.domain.Contact> getDomainType() {
        return Contact.class;
    }

    public Long getId(Contact contact) {
        return contact.getId();
    }

    public Class<java.lang.Long> getIdType() {
        return Long.class;
    }

    public Object getVersion(Contact contact) {
        return contact.getVersion();
    }
}
